﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Creative85.Framework.Data;
using Creative85.Framework.Utilities;
using Project32CHE.Biz.Unionshop.Models;
using NPoco;

namespace Project32CHE.Biz.Unionshop
{
    public static class ItemService
    {
        public static Item Get(Guid shopid, string code)
        {
            return Db.Instance.Query<Item>().Where(x => x.ShopID == shopid && x.ItemCode == code && x.IsDeleted == false).SingleOrDefault();
        }
        public static ItemCategory GetItemCategory(Guid id)
        {
            return Db.Instance.SingleById<ItemCategory>(id);
        }
    }
}
